<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>19.函数传参</title>
</head>
<body>
<script>
  function * gen(arg){
    console.log(arg)
    let one = yield '1'
    console.log(one)
    let two = yield '2'
    console.log(two)
    let three = yield '3'
    console.log(three)
  }

  let iter = gen('整体参数')
  console.log(iter.next())
  console.log(iter.next('aaa'))
  console.log(iter.next('bbb'))
  console.log(iter.next('ccc'))

</script>
</body>
</html>